﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApp
{
    public partial class LoginSystem : Form
    {
        public LoginSystem()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            localhost.WebService client = new localhost.WebService();

            client.CookieContainer = CookieContainer.Data;

            var state = client.LoginSystem(this.txtUname.Text, this.txtPwd.Text);

            if (state)
            {
                FrmMain m = new FrmMain();

                m.Show();

                this.Hide();
            }
            else
            {
                MessageBox.Show("用户名或者密码错误！");
            }
        }
    }
}
